package com.mgkj.dto.yf;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.mgkj.dto.KWAndNum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * @author : ssy
 * @date: 2024-04-25
 * @Description: 销货单单身数据传输对象
 */
@Data
@ApiModel("销货单单身Dto")
public class InitSalesSlipBodyDto implements Serializable {
    @ApiModelProperty(value = "单别", required = true)
    @NotBlank(message = "单别不能为空")
    @JsonProperty("TH001")
    private String TH001;

    @ApiModelProperty(value = "单号")
    @NotBlank(message = "单号不能为空")
    @JsonProperty("TH002")
    private String TH002;

    @ApiModelProperty(value = "序号", required = true)
    @NotBlank(message = "序号不能为空")
    @JsonProperty("TH003")
    private String TH003;

    @ApiModelProperty(value = "品号--TO007", required = true)
    @NotBlank(message = "品号不能为空")
    @JsonProperty("TH004")
    private String TH004;

    @ApiModelProperty(value = "仓库-TO011", required = true)
    @NotBlank(message = "仓库不能为空")
    @JsonProperty("TH007")
    private String TH007;

    @ApiModelProperty(value = "数量-TO024", required = true)
    @DecimalMin(value = "0.01", message = "数量不许小于0")
    @JsonProperty("TH008")
    private Double TH008;

    @ApiModelProperty(value = "单位-TO010", required = true)
    @NotBlank(message = "单位不能为空")
    @JsonProperty("TH009")
    private String TH009;

    @ApiModelProperty(value = "单价-TO020")
    @DecimalMin(value = "0.01", message = "单价不能小于0")
    @JsonProperty("TH012")
    private Double TH012;

    @ApiModelProperty(value = "金额-TO021")
    @DecimalMin(value = "0.01", message = "金额不能小于0")
    @JsonProperty("TH013")
    private Double TH013;

    @ApiModelProperty(value = "订单单别-TO004", required = true)
    @NotBlank(message = "订单单别不能为空")
    @JsonProperty("TH014")
    private String TH014;

    @ApiModelProperty(value = "订单单号-TO005", required = true)
    @NotBlank(message = "订单单号不能为空")
    @JsonProperty("TH015")
    private String TH015;

    @ApiModelProperty(value = "订单序号-TO006", required = true)
    @NotBlank(message = "订单序号不能为空")
    @JsonProperty("TH016")
    private String TH016;

    @ApiModelProperty(value = "批号-TO014")
    @NotBlank(message = "批号不能为空")
    @JsonProperty("TH017")
    private String TH017;

    @ApiModelProperty(value = "审核码", required = true)
    @Pattern(regexp = "^[NY]$", message = "只允许输入N|Y")
    @JsonProperty("TH020")
    private String TH020;

    @ApiModelProperty(value = "件装-TO012")
    @DecimalMin(value = "0", message = "")
    @JsonProperty("TH043")
    private Double TH043;

    @ApiModelProperty(value = "件数-TO013")
    @NotBlank(message = "件数不能为空")
    @JsonProperty("TH044")
    private Double TH044;
    @ApiModelProperty(value = "出货通知单别-TO001")
    @NotBlank(message = "")
    @JsonProperty("TH045")
    private String TH045;
    @ApiModelProperty(value = "出货通知单号-TO002")
    @NotBlank(message = "出货通知单别")
    @JsonProperty("TH046")
    private String TH046;
    @ApiModelProperty(value = "出货通知序号-TO003")
    @NotBlank(message = "出货通知序号")
    @JsonProperty("TH047")
    private String TH047;

    @ApiModelProperty(value = "库位-TO039")
    @NotBlank(message ="库位")
    @JsonProperty("TH056")
    private String TH056;

    @ApiModelProperty(value = "赠/备品数量-TO019-TO202")
    @NotBlank(message ="赠/备品数量")
    @JsonProperty("TH024")
    private Double TH024;

    @ApiModelProperty(value = "库位和对应的验收数量")
    private List<KWAndNum> kwInfo;

}
